Health Cloud Diagnostics System API - Implementation Template
Developer guide
Diagnostics Dev Guide
The US-Core Diagnostics application uses the following DataWeave modules to map between HealthCloud and FHIR formats.
| Module | Description | 
|---|---|
| DiagnosticReportFHIRTools | DiagnosticReportFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format. | 
| DiagnosticReportRequest | This module defines functions needed to convert a FHIR DiagnosticReport resource into it's representation within Health Cloud. | 
| ObservationFHIRTools | |
| ObservationRequest | This module defines functions needed to convert a FHIR Organization resource into it's representation within Health Cloud. | 
| Util | A library with needed dataweave utility functions. | 
DiagnosticReportFHIRTools
DiagnosticReportFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/DiagnosticReport/DiagnosticReportFHIRTools.dwl
Functions
fun getDiagnosticReportIdentifiers (identifiers, digReport)
Gets the diagnosticReport identifiers with the provided HC ID array and returns a list of FHIR DiagnosticReport objects.
param
idTypeMapis a map of HC Ids to FHIR identifier codes.
paramidentifiersis an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
DiagnosticReportRequest
This module defines functions needed to convert a
FHIR DiagnosticReport resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/DiagnosticReport/DiagnosticReportRequest.dwl
Functions
fun getDiagnosticReportUpsert (fhirObj, codeSetBundleList)
Converts the provided DiagnosticReport FHIR object to the HealthCloud DiagnosticSummary object.
param
fhirObjis a FHIR DiagnosticReport object.
return A HealthCloud DiagnosticSummary object.
fun getDiagnosticReportUpdate (fhirObj, codeSetBundleList)
Converts the provided DiagnosticReport FHIR object to the HealthCloud DiagnosticSummary object for Update of Diagnostic Report.
param
fhirObjis a FHIR DiagnosticReport object.
return A HealthCloud DiagnosticSummary object.
fun getDiagnosticReportIdentifier (identifier, diagnosticReportId, typeId)
Converts the provided DiagnosticReport FHIR object to the HealthCloud Identifier object.
param
identifieris a FHIR DiagnosticReport identifier object.
return A HealthCloud Identifier object.
fun getCodeSetUpsert (codeSetList)
Converts the provided DiagnosticReport FHIR object to the HealthCloud CodeSet object.
param
codeSetListis the list of codeSet object.
return HealthCloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided DiagnosticReport FHIR object to the HealthCloud CodeSetBundle object.
param
codeSetListis the list of CodeSetBundle object.
parambundleTypeis for defining the CodeSetBundle type.
paramnameis for defining the name of the CodeSetBundle.
return HealthCloud CodeSetBundle upsert fields.
ObservationFHIRTools
Source:
.src/main/resources/dwl/Observation/ObservationFHIRTools.dwl
Functions
fun getCode (obs, codeId)
Gets the code object with the provided observation object and returns null if not found.
param
obsis a HC Code object.
return An array of FHIR formatted Code objects.
fun getIdentifier (observation)
Gets the observation identifiers with the provided HC ID array and returns a list of FHIR Observation objects.
param
identifiersis an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getBodySite (obs)
Gets the bodySite object with the provided observation object and returns null if not found.
param
obsis a HC bodySite object.
return An array of FHIR formatted BodySite objects.
fun getInterpretation (obs)
Gets the interpretation object with the provided observation object and returns null if not found.
param
obsis a HC interpretation object.
return An array of FHIR formatted Interpretation objects.
fun getMethod (obs)
Gets the method object with the provided observation object and returns null if not found.
param
obsis a HC method object.
return An array of FHIR formatted Method objects.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
ObservationRequest
This module defines functions needed to convert a
FHIR Organization resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Observation/ObservationRequest.dwl
Functions
fun getObservationDetails (fhirObj, codeSetBundleList, codeId)
Converts the provided Observation FHIR object to the HealthCloud CareObservation object.
param
fhirObjis a FHIR Observation object.
return A HealthCloud Observation object.
fun getObservationDetailsUpdate (fhirObj, codeSetBundleList, codeId)
Converts the provided Observation FHIR object to the HealthCloud CareObservation object.
param
fhirObjis a FHIR Observation object.
return A HealthCloud Observation object.
fun getObservationIdentifier (identifier, observationId, typeId)
Converts the provided Observation FHIR object to the HealthCloud Identifier object.
param
identifieris a FHIR Observation identifier object.
return A HealthCloud Identifier object.
fun getObservationComponents (components, observationId, codeSetBundleList, Index)
Converts the provided Observation Component FHIR object to the HealthCloud CareObservationComponent object.
param
componentsis a FHIR Observation Component object.
return A HealthCloud Observation object.
fun getCodeSetUpsert (codeSetList)
Converts the provided Observation FHIR object to the HealthCloud CodeSet object.
param
codeSetListis the list of codeSet object.
return HealthCloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Observation FHIR object to the HealthCloud CodeSetBundle object.
param
codeSetListis the list of CodeSetBundle object.
parambundleTypeis for defining the CodeSetBundle type.
paramnameis for defining the name of the CodeSetBundle.
return HealthCloud CodeSetBundle upsert fields.
Util
A library with needed dataweave utility functions.
Source:
.src/main/resources/dwl/Util.dwl
Functions
fun clean (obj: Object)
Cleans the provided object of blank strings, null values, empty objects, and empty arrays.
param
objis an Object to clean.
return A cleaned object.
fun clean (arr: Array)
Cleans the provided array of blank strings, null values, empty objects, and empty arrays.
param
arris an Array to clean.
return A cleaned Array.
fun removeNull (arr: Array)
Removes all null items from an array.
param
arris an array.
return An array with null items removed.
fun removeNull (obj: Object)
Removes all null values from an object.
param
objis an object.
return An object with null values removed.